﻿using System;
using System.Windows.Forms;
using Styx.Common;

namespace Auction.GUI
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            numBagItems.Value = MIRsettings.Instance.BagItems;
            numAuctioneerID.Value = MIRsettings.Instance.AuctioneerID;
            numMailboxID.Value = MIRsettings.Instance.MailboxID;
            TraMaxNumberOfAuctions.Value = MIRsettings.Instance.MaxNumberOfAuctions;
            MIRsettings.Instance.Load();
        }
        private void NumAuctioneerID_ValueChanged(object sender, EventArgs e)
        {
            MIRsettings.Instance.AuctioneerID = (int)numAuctioneerID.Value;
        }
        private void TraMaxNumberOfAuctions_Scroll(object sender, EventArgs e)
        {
            MIRsettings.Instance.MaxNumberOfAuctions = (int)TraMaxNumberOfAuctions.Value;
        }
        private void numMailboxID_ValueChanged(object sender, EventArgs e)
        {
            MIRsettings.Instance.MailboxID = (int)numMailboxID.Value;
        }
        private void BtnSave_Click(object sender, EventArgs e)
        {
            MIRsettings.Instance.Save();
        }
        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            MIRsettings.Instance.Save();
        }

        private void SliderToolTip_Popup(object sender, PopupEventArgs e)
        {

        }

        private void MailboxIDToolTip_Popup(object sender, PopupEventArgs e)
        {

        }

        private void AuctioneerToolTip_Popup(object sender, PopupEventArgs e)
        {

        }

        private void BagItemsCount_Popup(object sender, PopupEventArgs e)
        {

        }

        private void CountCapacity_Popup(object sender, PopupEventArgs e)
        {

        }

        private void numBagItems_ValueChanged(object sender, EventArgs e)
        {
            MIRsettings.Instance.BagItems = (int)numBagItems.Value;
        }
    }
}
